import request from '@/utils/request'

export function listRecord(query) {
  return request({
    url: '/video/list',
    method: 'get',
    params: query
  })
}

// 查询
export function getRecord(dirId) {
  return request({
    url: '/video/info/' + dirId,
    method: 'get'
  })
}

// 新增
export function addRecord(data) {
  return request({
    url: '/video',
    method: 'post',
    data: data
  })
}

// 修改
export function updateRecord(data) {
  return request({
    url: '/video',
    method: 'put',
    data: data
  })
}

// 删除
export function delRecord(dirId) {
  return request({
    url: '/video/' + dirId,
    method: 'delete'
  })
}